DIV | NN n/a IE 4 DOM 1 | ||
The DIV object reflects the DIV element. This element creates a block-level element often used for element positioning or containment grouping of several related elements. In the Windows version of IE 4, the client and scroll properties are not available unless the DIV element has its position style attribute set to absolute. | |||
HTML Equivalent<DIV> | |||
Object Model Reference
|
align | NN n/a IE 4 DOM 1 | ||
Read/Write | |||
Defines the horizontal alignment of the element within its surrounding container. | |||
Exampledocument.all.myDIV.align = "center" | |||
Value Any of the three horizontal alignment constants: center | left | right. | |||
|
clientHeight, clientWidth | NN n/a IE 4 DOM n/a | ||
Read/Write | |||
According to Microsoft's developer documentation, these properties reflect the height and width (in pixels) of the element's content. | |||
Examplevar midHeight = document.all.myDiv.clientHeight/2 | |||
Value Integer pixel value. | |||
|
dataFld | NN n/a IE 4 DOM n/a | ||
Read/Write | |||
Used with IE 4 data binding to associate a remote data source column name to a DIV element's content. A DATASRC attribute must also be set for the element. Setting both the dataFld and dataSrc properties to empty strings breaks the binding between element and data source. | |||
Exampledocument.all.myDiv.dataFld = "comment" | |||
Value Case-sensitive identifier of the data source column. | |||
|
dataFormatAs | NN n/a IE 4 DOM n/a | ||
Read/Write | |||
Used with IE 4 data binding, this property advises the browser whether the source material arriving from the data source is to be treated as plain text or as tagged HTML. | |||
Exampledocument.all.myDiv.dataFormatAs = "text" | |||
Value IE 4 recognizes two possible settings: text | HTML. | |||
|
dataSrc | NN n/a IE 4 DOM n/a | ||
Read/Write | |||
Used with IE 4 data binding to specify the name of the remote ODBC data source (such as an Oracle or SQL Server database) to be associated with the element. Content from the data source is specified via the DATAFLD attribute. Setting both the dataFld and dataSrc properties to empty strings breaks the binding between element and data source. | |||
Exampledocument.all.myDiv.dataSrc = "#DBSRC3" | |||
Value Case-sensitive identifier of the data source. | |||
|
scrollHeight, scrollWidth | NN n/a IE 4 DOM n/a | ||
Read-only | |||
The meaning of these two properties is ambiguous based on Microsoft's description and the way they're implemented in the Windows and Macintosh versions of Internet Explorer 4. My best guess is that these properties are intended to measure the height and width (in pixels) of the content of an element even when some of the content cannot be seen unless scrolled with scrollbars. The Macintosh version of the browser interprets this to mean the amount of the content that you can see at any one time. The important point is that for key elements, such as the BODY, the properties mean different things and can disrupt cross-platform operation. | |||
Examplevar midPoint = document.all.myDiv.scrollHeight/2 | |||
Value Positive integer or zero. | |||
|
scrollLeft, scrollTop | NN n/a IE 4 DOM n/a | ||
Read/Write | |||
The distance in pixels between the actual left or top edge of the element's physical content and the left or top edge of the visible portion of the content. Setting these properties allows you to use scripts to adjust the scroll of content within a scrollable container, such as text in a TEXTAREA element or an entire document in the browser window or frame. When the content is not scrolled, both values are zero. Setting the scrollTop property to 15 scrolls the document upward by 15 pixels in the window; the scrollLeft property is unaffected unless explicitly changed. The property values change as the user adjusts the scrollbars. | |||
Exampledocument.all.myDiv.scrollTop = 40 | |||
Value Positive integer or zero. | |||
|
blur( ) | NN n/a IE 4 DOM n/a |
Removes focus from the current element and fires an onBlur event (in IE). No other element necessarily receives focus as a result. | |
Returned Value None. | |
Parameters None. |
focus( ) | NN n/a IE 4 DOM n/a |
Gives focus to the current element and fires the onFocus event (in IE). If another element had focus at the time, it receives an onBlur event. | |
Returned Value None. | |
Parameters None. |